home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
089a.dms
/
089a.adf
/
EXAMPLE_PROGRAMS
/
example26.AMOS
/
example26.amosSourceCode
Wrap
AMOS Source Code
|
1992-03-06
|
1KB
|
57 lines
'==================
'EXAMPLE PROGRAM 26
'==================
'
'This calls the procedure _LHA
'----------------------------
_LHA
'
'
Procedure _LHA
Screen Open 0,640,250,4,Hires
Flash Off : Curs Off : Paper 0 : Pen 2 : Cls 0
Centre "A.M.O.S.Z.I.N.E LHA DE-ARCHIVER V1.0"
Print : Print
Wait 75
'Copy LHA from the C directory of DF0: to RAM:
'----------------------------------------------
Amos To Back
COMMAND$="df0:c/copy df0:c/lha ram:"
Dreg(1)=Varptr(COMMAND$)
Dreg(2)=0
Dreg(3)=0
XEXECUTE=Doscall(-222)
Amos To Front
'Allow user to select an archive to extract
'------------------------------------------
Dir$="df0:"
S$=Fsel$("*.lha","","PLEASE SELECT A .LHA FILE","")
C$=Right$(S$,4)
If C$<>".lha" or(Exist(S$)=0) or(S$="") Then Cls 0 : Print "INVALID SELECTION,ABORTING " : Wait 100 : Screen Close 6 : Kill "RAM:LHA" : Dir$=DI$ : Pop Proc
'
Print "Please insert a blank formatted disk (or a disk with a lot of space) in DF0:"
Print "and then press any key to de-archive your selected file."
Clear Key
Wait Key
'Extract the archive and de-archive onto disk in DF0:
'-----------------------------------------------------
Amos To Back
COMMAND$="ram:lha X "+S$+" df0:"+Chr$(0)
Dreg(1)=Varptr(COMMAND$)
Dreg(2)=0
Dreg(3)=0
XEXECUTE=Doscall(-222)
Amos To Front
'Erase lha from memory
'----------------------
Kill "ram:lha"
Print : Print "ALL DONE"
End Proc